package cn.itcast.lock;
public class MyThread extends Thread{
    private MySevice sevice;
 
    public MyThread(MySevice sevice) {
        this.sevice = sevice;
    }
 
    @Override
    public void run() {
        sevice.testMethod();
    }
}